package starfire.gui.download;

import java.io.*;
import java.util.*;
import javax.swing.tree.*;

import org.jdom.*;
import org.jdom.input.*;
import org.jdom.output.*;


/**
 * <p>Title: JFtp</p>
 * <p>Description: ftp client</p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: </p>
 * @author starfire
 * @version 1.0
 */

public class DownloadXMLSupport {
  private DownloadXMLSupport() {
  }

  public static TreeModel getTaskTreeModel(String fileName)
  {
    File f = new File(fileName);
    return getTaskTreeModel(f);
  }

  public static TreeModel getTaskTreeModel(File f)
  {
    FileInputStream in = null;
    try
    {
      in = new FileInputStream(f);
    }catch (Exception e)
    {
      e.printStackTrace();
      return null;
    }
    return getTaskTreeModel(in);
  }

  public static TreeModel getTaskTreeModel (InputStream in)
  {
    SAXBuilder builder = new SAXBuilder();
    Document doc = null;
    Element root;
    try
      {
        builder.build(in);
      }catch (Exception e)
      {
  ////
      }
    return null;
  }
}